package com.xhl.mybatis.controller;

import com.xhl.mybatis.dto.UserDTO;
import com.xhl.mybatis.service.IUserInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author CazCen
 * @Date 2021/12/15 19:30
 */
@Api(tags = "用户信息")
@RequestMapping(value = "/user/info")
@RestController
public class UserInfo {

    @Resource
    IUserInfo iUserInfo;


    @ApiOperation(value = "获取用户信息")
    @PostMapping("/getUserInfo")
    public String getUserInfo(@RequestBody UserDTO userDTO){

        String userInfo = iUserInfo.getUserInfo(userDTO);

        return userInfo;
    }

}
